import pyperclip


# 剪切板操作类
class Copy_text_Management:
    def __init__(self):
        """
        剪切板操作类

        """
        pass

    def text_copy_to_bord(self, data):
        """
        复制数据到剪切板 \n

        :param data: 要复制的数据 \n
        :return: 布尔值 \n
        """
        try:
            pyperclip.copy(data)  # 将文本复制到剪贴板
            return True
        except Exception as e:
            print(e)
            return False

    def bord_copy_to_text(self):
        """
        从剪贴板粘贴文本 \n

        :return: \n
        """
        try:
            return pyperclip.paste()
        except Exception as e:
            print(e)
            return False
